package com.egg.auth.model.response.web;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@ApiModel(value = "角色资源可选视图")
public class RoleMenuResourceOption {


    @ApiModelProperty(value = "菜单")
    private List<MenuOption> menus;

    @ApiModelProperty(value = "菜单功能权限")
    private List<PermOption> perms;


    @Data
    public static class MenuOption {

        @ApiModelProperty(value = "菜单ID")
        private Long value;

        @ApiModelProperty(value = "菜单名")
        private String label;

        @ApiModelProperty(value = "子菜单")
        private List<MenuOption> children;

        @ApiModelProperty(value = "子菜单")
        private Boolean isPerm;


    }


    @Data
    public static class PermOption {


        @ApiModelProperty(value = "菜单功能权限ID")
        private Long value;

        @ApiModelProperty(value = "菜单功能权限名称")
        private String label;

    }


}
